<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<link rel="stylesheet" href="http://localhost/LDF/Vmovier/Template/default/css/inc.css" />
	<link rel="stylesheet" href="http://localhost/LDF/Vmovier/Template/default/css/public.css" />
	<!--[if IE 7]>
		<link rel="stylesheet" href="http://localhost/LDF/Vmovier/Template/default/css/ico-ie7.css">
	<![endif]-->
	<script type="text/javascript" src="http://localhost/LDF/Vmovier/Template/default/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="http://localhost/LDF/Vmovier/Template/default/js/public.js"></script>
	<script type="text/javascript" src="http://localhost/LDF/Vmovier/Template/default/js/slide.js"></script>
	<script type="text/javascript" src="http://localhost/LDF/Vmovier/Template/default/js/slide.js"></script>
	<title>影片列表 - <?php echo $const['webname'];?> </title>
<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?></head>
<body>
	<!-- 顶部开始 -->
	<div class="bgblack">
		<div class="w1200 auto p5 bgblack">
			<a class="white-2 af mr20" href="http://localhost/LDF/Vmovier">老地方电影</a>
		</div>
	</div>
	<!-- 顶部结束 -->
	<!-- menu开始 -->
	<div class="h65 bgwhite rel zix2 fixMenu">
		<div class="w1200 auto h65 rel fix">
			<div class="logo t0 l0 w100 h65 l mr30"><img src="http://localhost/LDF/Vmovier/Template/default/img/logo.png" alt="" /></div>
			<ul class="l fm rel menu">
					<li class="l lh60 mr30" act="1"><a class="w50 tc dib f16 black" href="http://localhost/LDF/Vmovier">首页</a></li>
						<?php
		$re = M('category')->limit(5)->where('pid=0')->all();
		foreach ($re as $c) :
			if(13==$c['cid']) $c['act']='act="1"';
			$c['url']=U($c['url'],array('cid'=>$c['cid'],'nav'=>$c['cid']));
		?>
					<li class="l lh60 mr30" <?php echo $c['act'];?>><a class="w50 tc dib f16 black" href="<?php echo $c['url'];?>"><?php echo $c['cname'];?></a></li>
				<?php endforeach ;?>
				<span class="movebg dib w50 bgblue h4 abs b0 l0"></span>
			</ul>
			<div class="r abs t20 r10">
				<form action="<?php echo U('search/index');?>" method="get" class="dib ">
					<div class="dib bdc w200 rel">
						<input class="p5 pct80 bd0" type="text" name="keys" />
						<input type="submit" class="hand gray abs t3 r5 bd0 search" value="&emsp;&ensp;" />
					</div>
				</form>
				<p class="p5 dib fm ml10">
					<?php if($_SESSION['user']['uid']){?>
						<span class="f14 black mr10">欢迎您： <a class="gray a f14" href="<?php echo U('User/index');?>"><i class="icon-user mr3 gray"></i><?php echo $_SESSION['user']['email'];?> [ <?php echo $_SESSION['user']['nickname'];?> ]</a></span>
						<a class="f14 black" href="<?php echo U('User/out');?>"><i class="icon-signout mr3 gray"></i>退出</a>
						<?php if($_SESSION['user']['level'] > 0){?>
							| <a class="f14 blue5 tsblack" href="http://localhost/LDF/Vmovier?a=admin">后台管理</a>
							<?php if($_SESSION['user']['level'] == 9){?><span class="p2 pl5 pr5 rad50 white bgmaroon">超</span><?php }?>
						<?php }?>
					<?php  }else{ ?>
						<a class="f14 black mr10" href="<?php echo U('User/login');?>">登录</a>
						<a class="f14 black" href="<?php echo U('User/reg');?>">注册</a>
					<?php }?>
					
				</p>
			</div>
		</div>
	</div>
	<!-- menu结束 -->

	<!-- 内容开始 -->
	<div class="w1180 auto mt20 fix">
		<div class="fm rel">
			<span class="f24 black2">频道名称</span>
			<div class="abs r0 t0">
				<span class="fm f16 gray1">当前频道共有影片</span><br>
				<span class="fm f16 gray1"><b class="fg red2 f24 p5"><?php echo $total;?></b>部</span>
			</div>
		</div>
		<!-- 排序 -->
		<div class="mt30 fm f14">
			<span class="fm mr5">排序：</span>
			<span id="order">
			<a href="<?php echo U('List/index',array('cid'=>$_GET['cid'],'nav'=>$_GET['nav'],'order'=>1));?>" class="rad5 p2 pl5 pr5 bgred white black f14 mr5" >评论最多</a>
			<a href="<?php echo U('List/index',array('cid'=>$_GET['cid'],'nav'=>$_GET['nav'],'order'=>2));?>" class="rad5 p2 pl5 pr5 f14 black mr5">喜欢最多</a>
			<a href="<?php echo U('List/index',array('cid'=>$_GET['cid'],'nav'=>$_GET['nav'],'order'=>3));?>" class="rad5 p2 pl5 pr5 f14 black mr5">最高评分</a>
			<a href="<?php echo U('List/index',array('cid'=>$_GET['cid'],'nav'=>$_GET['nav'],'order'=>4));?>" class="rad5 p2 pl5 pr5 f14 black">最新发布</a>
			</span>
		</div>
		<!-- 排序结束 -->

		<?php $hd["list"]["a"]["total"]=0;if(isset($article) && !empty($article)):$_id_a=0;$_index_a=0;$lasta=min(1000,count($article));
$hd["list"]["a"]["first"]=true;
$hd["list"]["a"]["last"]=false;
$_total_a=ceil($lasta/1);$hd["list"]["a"]["total"]=$_total_a;
$_data_a = array_slice($article,0,$lasta);
if(count($_data_a)==0):echo "";
else:
foreach($_data_a as $key=>$a):
if(($_id_a)%1==0):$_id_a++;else:$_id_a++;continue;endif;
$hd["list"]["a"]["index"]=++$_index_a;
if($_index_a>=$_total_a):$hd["list"]["a"]["last"]=true;endif;?>

			<!-- 图片列表 -->
			<div class="dib w280 bgwhite mt30 mr10 of">
				<a href="<?php echo U('Index/content',array('cid'=>$a['cid'],'aid'=>$a['aid'],'nav'=>$_GET['nav']));?>">
					<img class="bgblack" width="280" height="190" src="http://localhost/LDF/Vmovier/<?php echo $a['medium'];?>" alt="" />
				</a>
				<p class="fm p10 f14 h40"><?php echo mb_substr($a['title'],0,35,'utf8');?></p>
				<div class="p10 rel">
					<i class="icon-comment icon-large gray4 mr5"></i><span class="vm"><?php echo $a['comments'];?></span>
					<i class="icon-heart icon-large gray4 mr5 ml20"></i><span class=""><?php echo $a['enjoys'];?></span>
					<p class="abs r10 t5">
						<span class="dib w90 h14 star f0 ">
							<b class="dib h14 f0" style="width:<?php echo getStarPct($a['star']);?>%"></b>
						</span>
						<span class="f14 orange1 vt"><?php echo $a['star'];?></span>
					</p>
				</div>
			</div>
			<!-- 图片列表结束 -->
		<?php $hd["list"]["a"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
		<div class="page mt10"><?php echo $page;?></div>
	</div>
	<!-- 内容结束 -->


<script type="text/javascript">
	var order = '<?php echo $_GET["order"];?>';

	if(order){
		var k = Number(order);
		--k;
		$('#order a').removeClass('bgred white');
		$('#order a').eq(k).addClass('bgred white');
	}
</script>








<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?>	<!-- 底部开始 -->
	<div class="bgblack h100 white-2 mt20">
		<!-- <div class="fs tc pt10">
			<a href="" class="dib p5 white-2">合作推广</a>
			<a href="" class="dib p5 white-2">联系我们</a>
			<a href="" class="dib p5 white-2">加入我们</a>
		</div> -->
		<div class="pt20">
			<p class="tc p5"><?php echo $const['bottom1'];?></p>
			<p class="tc p5"><?php echo $const['bottom2'];?></p>
		</div>
	</div>
	<!-- 底部结束 -->
</body>
</html>